package com.sykj.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.sykj.entity.Classes;
import com.sykj.entity.Student;
import com.sykj.entity.StudentCustemer;
import com.sykj.mapper.StudentMapper;
import com.sykj.service.StudentService;

@Service
@Transactional
public class StudentServiceImpl implements StudentService {

	@Autowired
	private StudentMapper studentMapper;
	
	@Override
	public List<StudentCustemer> queryAll(Student student) {
		return studentMapper.queryAll(student);
	}

	@Override
	public void deleteStudent(Integer stuno) throws Exception {
		studentMapper.deleteStudent(stuno);
	}

	@Override
	public List<Classes> queryClass() {
		return studentMapper.queryClass();
	}

	@Override
	public void insertStudent(Student student) throws Exception {
		studentMapper.insertStudent(student);
	}

	@Override
	public Student queryById(Integer stuno) {
		return studentMapper.queryById(stuno);
	}

	@Override
	public void updateStudent(Student student) throws Exception {
		studentMapper.updateStudent(student);
	}

}
